import { createRouter, createWebHashHistory } from "vue-router";
import Login from '../views/login.vue'

const routes = [
    {
        path: '/',
        component: () => import('../views/Main.vue'),
        redirect: '/page1',
        children: [
          {
            path: '/page1',
            name: 'page1',
            component: () => import('../views/Page1.vue')
        },
            {
                path: '/page1',
                name: 'page1',
                component: () => import('../views/Page1.vue')
            },
            {
                path: '/page2',
                name: 'page2',
                component: () => import('../views/Page2.vue')
            },
            {
                path: '/page3',
                name: 'page3',
                component: () => import('../views/Page3.vue')
            },
            {
                path: '/other',
                name: 'other',
                component: () => import('../views/Other.vue')
            },
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router